//
//  ImageButtonV.m
//  MGameTribe
//
//  Created by 杨 敏 on 13-8-28.
//  Copyright (c) 2013年 YangMin. All rights reserved.
//

#import "ImageButtonV.h"
#import "ConstantHeader.h"
#import "Tool.h"

@implementation ImageButtonV
@synthesize tag;
-(void)setTag:(NSInteger)newtag{
    tag=newtag;
    _imagebutton.tag=newtag;
    _titleButton.tag=newtag;
}



- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor=[UIColor clearColor];
        
        self.imagebutton=[DoubleFaceButton buttonWithType:UIButtonTypeCustom];
        _imagebutton.frame=self.bounds;
        [self addSubview:_imagebutton];
        
        self.titleButton=[UIButton buttonWithType:UIButtonTypeCustom];
        _titleButton.frame=self.bounds;
        _titleButton.backgroundColor = [UIColor clearColor];
        _titleButton.titleLabel.textAlignment = NSTextAlignmentRight;
        _titleButton.userInteractionEnabled=NO;
        [self addSubview:_titleButton];

    }
    return self;
}

-(void)layoutSubviews{
    [super layoutSubviews];
    _imagebutton.frame=self.bounds;
    _titleButton.frame=self.bounds;
}


@end
